<%@ page language="java" import="java.util.*" pageEncoding="Utf-8"%>
<%@taglib uri="/struts-tags" prefix="s"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>管理员列表</title>
<link rel="stylesheet" href="${pageContext.request.contextPath}/common/style/base.css" type="text/css" media="screen" />
<link rel="stylesheet" href="${pageContext.request.contextPath}/common/style/page.css" type="text/css" media="screen" />
<script src="${pageContext.request.contextPath}/common/js/jquery-1.7.2.min.js" type="text/javascript"></script>
<script src="${pageContext.request.contextPath}/common/js/common.js" type="text/javascript"></script>
<script type="text/javascript">

function addAdmin(){
	var iframe = $(this.iframe).contents();
	 
	iframe.find("#addsubmit").click();
	return false;
}
function editAdmin(){
	var iframe = $(this.iframe).contents();
	 
	iframe.find("#editsubmit").click();
	return false;
}

</script>
</head>
<body>
<div id="main_frame">	
	<div id="pagemenu"><a href="javascript:;" title="管理员管理" class="selected">管理员管理</a>|<a href="javascript:void(0);" onclick="parent.mnipotent({'linkurl':'panel/admin/addAdmin.jsp','title':'添加管理员','w':480,'h':120,'sucfun':addAdmin});" title="添加管理员">添加管理员</a></div>
	<div class="listbox">	
	<table class="listtab"  align="center">
		<thead>
			<tr>
				<th width="42"><span class="mline"><input type="checkbox" name="checkbox" id="checkbox" onclick="selectall(this);" /></span></th>
				<th width="130"><span class="mline">用户名</span></th>
				<th width="130"><span class="mline">最后登录IP</span></th>
				<th width="160"><span class="mline">最后登录时间</span></th>
				<th width="160"><span class="mline">创建时间</span></th>
				<th width="160"><span class="mline">修改时间</span></th>
				<th width="120">管理操作</th>
			</tr>
		</thead>
		<tbody>	
		 <s:iterator value="adminlist" id="x" status="st">
			<tr>
				
				<td><s:if test="#session.adminId!=#x.id"><input type="checkbox" name="checkbox" value=${x.id} class="ckbox"/></s:if></td>
				<td>${x.loginName}</td>
				<td>${x.lastLoginIp}</td>
				<td><s:date name="#x.lastLoginTime" format="yyyy-MM-dd HH:mm:ss"/></td>
				<td><s:date name="#x.createTime" format="yyyy-MM-dd HH:mm:ss"/></td>
				<td><s:date name="#x.updateTime" format="yyyy-MM-dd HH:mm:ss"/></td>
				
					<td>
					<!--<a href="javascript:void(0);" onclick="parent.mnipotent({'linkurl':'findById.action?id=${x.id}','title':'修改管理员','w':580,'h':330,'sucfun':editAdmin});" title="修改管理员" class="abg">修改</a>
					--><s:if test="#session.adminId!=#x.id">
					<a href="deleteById.action?ids=${x.id}" title="删除" onclick="return delete_confirm();"class="abg">删除</a>
					</s:if>
					</td>
			</tr>
		</s:iterator>
		</tbody>
	</table>
	</div>
</div>
<div id="bottombar">
	<div class="fl"><span><a onclick="selectall(true);" href="javascript:void(0);">全选</a>/<a onclick="selectall(false);" href="javascript:void(0);">取消</a></span><a href="javascript:void(0);" onclick="removes('deleteById.action');" title="删除" class="addsource">删除</a></div>
	<div class="fr listpage"><s:property escape="false" value="pagination"/></div>
</div>
</body>
</html>